package com.rayframework.beans.factory.config;

import java.util.Map;

/**
 * 用来封装Bean标签数据 - 注解Bean
 *
 * @author LiaoYuXing-Ray
 * @version 1.0
 * @createDate 2023/11/25 16:59
 **/
public class AnnotationBeanDefinition {
    /**
     * 标记是否实现了接口 2023/9/20 17:04
     * 默认未实现
     */
    private boolean isInterfaceImpl = false;
    /**
     * 是否使用了依赖项别名 2023/9/20 16:10
     * 默认不使用依赖项别名
     */
    private boolean useQualifier = false;
    /**
     * RayQualifier注解的value 2023/9/20 16:10
     * 注入依赖项的名称
     * 默认为空字符串
     */
    private String aliasFor = "";

    /**
     * 接口实例化对象集合 2023/9/20 16:13
     * 如果实例化对象实现接口，使用这个存储实例化Bean对象，具体反射实例化哪个Bean由 RayQualifier 注解的value决定
     */
    private Map<String, Object> componentObjectMap;

    /**
     * 实例化对象 2023/9/20 16:13
     * 未实现接口使用的实例化Bean对象
     */
    private Object componentObject;

    public boolean isInterfaceImpl() {
        return isInterfaceImpl;
    }

    public void setInterfaceImpl(boolean interfaceImpl) {
        isInterfaceImpl = interfaceImpl;
    }

    public boolean isUseQualifier() {
        return useQualifier;
    }

    public void setUseQualifier(boolean useQualifier) {
        this.useQualifier = useQualifier;
    }

    public String getAliasFor() {
        return aliasFor;
    }

    public void setAliasFor(String aliasFor) {
        this.aliasFor = aliasFor;
    }

    public Map<String, Object> getComponentObjectMap() {
        return componentObjectMap;
    }

    public void setComponentObjectMap(Map<String, Object> componentObjectMap) {
        this.componentObjectMap = componentObjectMap;
    }

    public Object getComponentObject() {
        return componentObject;
    }

    public void setComponentObject(Object componentObject) {
        this.componentObject = componentObject;
    }
}
